<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            控制台
            <small>控制面板</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li class="active">资讯管理</li>
            <li class="active">{$name}</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-md-2">
                <div class="box box-solid">
                    <div class="box-header with-border">
                        <h3 class="box-title">资讯分类</h3>

                        <div class="box-tools">
                            <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
                            </button>
                        </div>
                    </div>
                    <div class="box-body no-padding" style="">
                        <ul class="nav nav-pills nav-stacked">
                            <?php foreach($infocates as $item){?>
                            <?php if($cid == $item['cat_id']){?>
                            <li class="active"><a href="{:url('/admin/info/index/cid/'.$item.cat_id)}"><i class="fa  fa-folder-open-o"></i> <?php echo $item['cat_title']; ?><span class="label label-warning pull-right">{:$total}</span></a></li>
                            <?php }else{ ?>
                            <li><a href="{:url('/admin/info/index/cid/'.$item.cat_id)}"><i class="fa fa-hand-o-right"></i> <?php echo $item['cat_title']; ?></a></li>
                            <?php } ?>
                            <?php } ?>
                        </ul>
                    </div>
                    <!-- /.box-body -->
                </div>
            </div>
            <div class="col-md-10">
                <div class="box">
                    <div class="box-header with-border">
                        <h3 class="box-title">{$name}</h3>
                        <a href="{:url('/admin/info/add/cid/'.$cid)}" class="btn  btn-primary pull-right"><i class="fa fa-plus"></i> 添加资讯</a>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <table class="table table-bordered center"><tbody>
                        <tr>
                            <th style="width: 60px">
                                <label for="checkall" class="btn btn-default">
                                    <input type="checkbox" value="" id="checkall" class="pointer">
                                    全选
                                </label>
                            </th>
                            <th>标题</th>
                            <th>缩略图</th>
                            <th>发布时间</th>
                            <th style="width: 100px;text-align: center">操作</th>
                        </tr>
                        <?php if($total != 0){ ?>
                        <?php foreach($info as $item){?>
                        <tr>
                            <td>
                                <label class="lb">
                                    <input type="checkbox" class="cbox"  value="" name="idarr[]">
                                </label>
                            </td>
                            <td><?php echo $item['title']; ?></td>
                            <td>
                                <img src="<?php echo thumb($item['img'],120,40,1); ?>" alt="">
                            </td>
                            <td><?php echo date('Y-m-d H:i',$item['pubtime']); ?></td>
                            <td >
                                <a href="{:url('/admin/info/edit/iid/'.$item['info_id'])}" class="btn btn-info"><i class="fa fa-edit"></i></a>
                                <a href="{:url('/admin/info/del/iid/'.$item['info_id'])}" class="btn btn-danger"><i class="fa fa-trash-o"></i></a>
                            </td>
                        </tr>
                        <?php } ?>
                        <?php }else{ ?>
                        <tr>
                            <td colspan="5" style="text-align: center;">抱歉，暂无相关数据！</td>
                        </tr>
                        <?php } ?>
                        </tbody></table>
                    </div>
                    <!-- /.box-body -->
                    <div class="box-footer clearfix">
                        <button type="button" class="btn btn-danger"><i class="fa fa-trash-o"></i> 删除</button>
                        {$info|raw}
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!-- /.content -->
</div>